Constantly increasing demands for processing greater volumes of graphics data at faster speeds continues to drive developments in the area of accelerated graphics rendering. Current accelerated graphics rendering schemes are complex processes that require accurate design and implementation of both hardware and software components. Accelerated graphics rendering typically uses hardware, usually a graphics processor, and software, usually a graphics driver that is executed by a host processor, to optimize the processing of graphics data and video information. Any problems, such as a design flaw or implementation defect, can compromise accelerated graphics rendering and can cause the accelerated graphics rendering to stop functioning. Such problems can include defective graphics processors, bus controllers, central processing units (CPUs), or other hardware. Other problems can include defects in graphics drivers, operating systems, graphics applications or other software.
Because of the complexity of the hardware and software used in accelerated graphics rendering, and the added complexity when such hardware and software are combined in varying forms, graphics processors often experience various rendering errors, including complete hangs. A hang is where a system or process becomes non-responsive, such as where a processor hangs up due to the processor stalling, locking up, getting stuck in an infinite loop or the like. Currently, such hangs can cause data loss, as well as halting operations on the entire computer system. Unfortunately, the constant introduction of new accelerated graphics rendering hardware and software, and the corresponding large number of possible combinations therebetween, makes it difficult to completely identify and eliminate all possible errors that could cause errors in accelerated graphics rendering.
Currently, the methods used to detect errors in accelerated graphics rendering rely on operating system level detection of hangs in the graphics driver and do not directly detect a hang in the corresponding graphics processor. For example, the method used by Microsoft Windows XP® to detect if an error has occurred in the accelerated graphics rendering process is to detect if there is a hang in a graphics driver. Here, a “watchdog timer” measures the time spent in a graphics driver by performing a spin-loop and then waits for the graphics processor to respond. The detection of an infinite loop is used by the operating system as a sign that the graphics processor is likely hung. Once a timeout expires, the operating system stops the graphics driver, displays a notification to the user, and prompts the user to restart the computer. Here, the watchdog timer executes periodically without regard as to whether rendering commands are currently being processed by the driver.
Microsoft Windows XP® is unable to differentiate between what appears to be a hang in the graphics driver from what is actually an ongoing execution of a large amount of rendering commands, as both appear as a slow response according to a predetermined waiting period. Also, with Microsoft Windows XP®, system resources are often wasted where the system attempts to determine whether the graphics driver is hung without regard as to whether the graphics driver has been issued any commands, i.e., whether it is currently idle. In addition, when Microsoft Windows XP® detects what it believes to be a hung graphics processor, the entire system must be restarted, forcing the user to terminate all hardware and software components regardless if they contributed to the hang in the graphics processor.
Another method used to detect a hung graphics driver is that used in the Microsoft Windows XP® Service Pack 1 (SP1). Here, the same “watchdog timer” is used, but in response to the detection of a hung graphics driver, the system unloads the graphics driver and loads a standard VGA driver in an attempt to continue graphics rendering operations in a non-accelerated mode. This design prevents data loss by allowing a user to save their work and restart the computer afterwards. However, using SP1, the advantages of operating in an accelerated graphics rendering mode are lost when the system switches into a non-accelerated mode. Also, like the Microsoft Windows XP® system, SP1 is unable to distinguish between a slow response from a graphics driver and a complete hang. In addition, when SP1 switches to a non-accelerated mode, the only way for the system to return to an accelerated graphics rendering mode is to perform a total system restart. Here again, the user is forced to terminate all hardware and software components regardless if such components contributed to the hang in the graphics processor.